<script>
export default {
	onLaunch: function() {
		console.log('App Launch');
	},
	onShow: function() {
		let token = uni.getStorageSync('token')
		if(token){
			// 每次打开设置token
			this.$http.setConfig((config) => { /* config 为默认全局配置*/
			    config.header = {
			        Authorization: 'Bearer '+token, // 演示用
			    }
			    return config
			})
		}
		this.$store.dispatch('getLogin')
		console.log('App Show');
	},
	onHide: function() {
		console.log('App Hide');
	}
};
</script>

<style lang="scss">
/*每个页面公共css */
@import '~@/static/style/app.scss';
@import '~@/components/bian-keywords/iconfont/iconfont.css';
</style>
